﻿<%@ Page Language="C#" AutoEventWireup="true"
    Inherits="CustomerManagement_LineOfBalanceManagementDetails" Codebehind="LineOfBalanceManagementDetails.aspx.cs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>

    <script type="text/javascript" src="../Include/Js/SocanCode.js"></script>

    <script type="text/javascript" src="../Include/Js/OpenWindow.js"></script>

    <script type="text/javascript">
       function setVIPValue(p)
       {
            document.getElementById("hidUserCode").value=p;
       }
       function OpenOrderWindow(link)
       {
           var url = "../Order/OrderDetail.aspx?code=" + link.title;//默认转向订单
           var index=link.title.indexOf("DD");//"DD"是订单的编号的开头

           if(index==-1)
           {
                url = "../Order/ReturnDocEdit.aspx?code=" + link.title;
                
                index=link.title.indexOf("THD");//"THD"是退货单的编号开头

                if(index==-1)
                {
                    url="MoneyManagementEdit.aspx?code=" + link.title;
                }
           }
           window.open(url);
       }
        function CheckNeedSave()
        {debugger;
            var hdSaveFlag = document.getElementById("hdSaveFlag");
            if(confirm('审核前需要保存吗?'))
            {
                hdSaveFlag.value="1";
            }
            else
            {
                hdSaveFlag.value="0";
            }
        }
    </script>

    <script type="text/javascript" src="../Include/Js/PopupCalendar.js"></script>

    <style type="text/css">
fieldset {width:96%;}
select {margin:0;padding:0;}
body{padding:0; margin:0; background-color:#ffffff; text-align:center; font: "宋体"; font-size:12px;}
a:visited{text-decoration:none;color:slategray;}
a:hover{text-decoration:underline;color:slategray;}
a:link{text-decoration:none;color:slategray;}
.juli {margin-top:10px;padding-left:20px;}
.juli1 {margin-top:20px; margin-left:20px; text-align:left;}
.juli2 { margin:5px auto;}
.juli3 { margin-bottom:50px;}
.juli4 {padding-left:20px;padding-top:20px;padding-bottom:10px;background-color:#fef3bb;}
.juli5 {padding:0px; margin:0px;}
.z1{background-color:#e7e7e7; text-align:left; line-height:20px;}
.z2{background-color:#FFFFFF; text-align:left; line-height:20px;}
.input_button {width:52px;height:23px;border:none;cursor:pointer; background:#ffffff url(../Include/Images/bt.gif) no-repeat;}
.input_button1 {width:74px;height:23px;border:none;cursor:pointer; background:#ffffff url(../Include/Images/bt1.gif) no-repeat;}
.input_button2 {width:52px;height:23px;border:none;background:#ffffff url(../Include/Images/bt.gif) no-repeat; padding-top:5px;}
.input_button2 a{color:#000000;}
.input_button2 a:hover{color:#FF3300; text-decoration:underline;}
.input_button3 {width:95px;height:23px;border:none;background:#ffffff url(../Include/Images/bt2.gif) no-repeat;}
.zt1 {padding-left:10px; font-weight:600; color:#000000;}
.zt2 {padding-left:10px;}
.zt3 {text-align:center; font-weight:600; color:#000000;}
.zt4 {text-align:center; color:#000000;}
.zt5 {text-align:left; font-weight:600;}
.zt6 {font-size:14px; font-weight:600;}
.zt7 {text-align:right; color:#000000;}
.zt8 {text-align:right; color:#000000;}
.spmenu { line-height:28px; text-align:center;margin-bottom:10px; border-color:#999999;}
.menu_bg {background-color:#fef3bb; padding-left:20px;padding-top:6px; padding-bottom:6px;border-bottom:#cf994b 1px solid;}
.menu_bg1 { background-color:#fef3bb; padding-left:20px;padding-top:6px; padding-right:20px;border-bottom:#cf994b 1px solid; height:28px;}
.tb {width:1050px;background-color:#999999;}
.tb1 {width: 90%; background-color:#999999; margin-top:10px;}
.tb2 {width: 1050px; background-color:#999999;}
.left {float:left; clear:right;}
.k1 {float:left;width:90%; background-color:#efefef; border:#999999 1px solid;padding-top:10px;}
.k2 {float:left; width:90%; line-height:28px; margin-top:10px;}
.k3 {float:left; width:90%; line-height:28px; margin-top:10px; padding-bottom:30px; clear:both;}
.btlj1 {background: url(../Include/Images/bt1.gif) no-repeat; width:74px; height:23px;text-align:center; padding-top:5px; font-size:12px; display:inline; float:left;margin-left:5px;}
.btlj1 a{color:#000000; text-decoration:none;}
.btlj1 a:hover{color:#FF3300;text-decoration:underline;}
.hidden{visibility:hidden;}
a.lj {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:link {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:visited {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:hover {color:#ff3300;}
a.lj:active {color:#ff3300;}
.bk_left {border-bottom:#999999 1px solid;border-right:#999999 1px solid;border-left:#999999 1px solid;border-top:#999999 0px solid;}
.bk_middle {border-bottom:#999999 1px solid;border-right:#999999 1px solid;border-left:#999999 0px solid;border-top:#999999 0px solid;}
h2 {padding-left:20px;padding-top:10px;margin:0; background: url(../Include/Images/menu_title.gif) repeat-x;height:21px;font-size:14px; font-weight:600;}
.menu_bg2 {background-color:#cccccc;text-align:left;margin:10px 0 10px 0;padding-top:5px;padding-bottom:5px;border:#CCCCCC 0px solid; font-size:12px;padding-left:20px;}
.menu_bg3 { background-color:#f5f5f5; padding-left:20px;padding-top:6px; padding-bottom:6px;border-bottom:#cccccc 1px solid;border-top:#cccccc 1px solid;clear:left;}
</style>
</head>
<body>
    <form id="form1" runat="server">
        <div align="Justify">
            <h2>
                结余款调整单详细信息</h2>
            <div class="menu_bg">
                <asp:Button ID="btnSave" runat="server" CssClass="input_button" Text="保存" OnClick="btnSave_Click" />
                <asp:Button ID="btnAudit" runat="server" CssClass="input_button" Text="核准" OnClick="btnAudit_Click" OnClientClick="CheckNeedSave()" />
                <asp:Button ID="btnDelete" runat="server" CssClass="input_button" Text="删除" OnClick="btnDelete_Click" />
                <asp:Button ID="btnCancel" runat="server" CssClass="input_button" Text="取消" OnClick="btnCancel_Click" />
                <asp:Button ID="btnReturn" runat="server" CssClass="input_button" Text="返回" OnClick="btnReturn_Click" />
                <input id="hidUserCode" type="hidden" runat="server" /></div>
                <asp:HiddenField ID="hdSaveFlag" runat="server" />
            <div class="juli">
                <asp:DataList ID="dlistMain" runat="server" OnItemCommand="dlistMain_ItemCommand"
                    OnItemDataBound="dlistMain_ItemDataBound">
                    <ItemTemplate>
                        <table style="background-color: #999999;" border="0" cellspacing="1" cellpadding="0">
                            <tr class="z2">
                                <td class="zt5" width="120" style="height: 16px">
                                    单据编号：

                                </td>
                                <td width="200" style="height: 16px">
                                    <%# Eval("BA_ID")%>
                                </td>
                                <td class="zt5" width="120" style="height: 16px">
                                    制单人：
                                </td>
                                <td width="200" style="height: 16px">
                                    <%# Eval("BA_CREATER")%>
                                </td>
                            </tr>
                            <tr class="z2">
                                <td class="zt5" style="height: 16px">
                                    关联单据编号：

                                </td>
                                <td width="200" style="height: 16px">
                                    <%--<%# Eval("BA_RID")%>--%>
                                    <a href="#" class="lj" title='<%# Eval("BA_RID")%>' onclick="OpenOrderWindow(this)">
                                        <%# Eval("BA_RID")%>
                                    </a>
                                </td>
                                <td class="zt5" style="height: 16px">
                                    制单日期：

                                </td>
                                <td style="height: 16px">
                                    <%# Eval("BA_CREATEDATE")%>
                                </td>
                            </tr>
                            <tr class="z2">
                                <td class="zt5" style="height: 16px">
                                    调整类型:
                                </td>
                                <td class="zt5" style="height: 16px">
                                    <asp:DropDownList ID="DdType" runat="server" Width="92px" Enabled="false">
                                    </asp:DropDownList>
                                </td>
                                <td class="zt5" style="height: 16px">
                                    审核日期：

                                </td>
                                <td>
                                    <%# Eval("BA_CHECKDATE")%>
                                </td>
                            </tr>
                            <tr class="z2">
                                <td class="zt5" style="height: 16px">
                                    审核人：
                                </td>
                                <td>
                                    <%# Eval("BA_CHECKER")%>
                                </td>
                                <td class="zt5" style="height: 16px">
                                    审核：

                                </td>
                                <td style="height: 16px">
                                    <asp:CheckBox ID="CheckBox4" runat="server" Checked=' <%# Convert.ToString(Eval("BA_CHECK"))=="1"?true:false %>'
                                        Enabled="false" />
                                </td>
                            </tr>
                            <tr class="z2">
                                <td class="zt5" style="height: 16px">
                                    备注：

                                </td>
                                <td colspan="3">
                                    <asp:TextBox ID="txtNote" runat="server" TextMode="MultiLine" Text='<%# Eval("BA_NOTE")%>'></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList></div>
            <br />
            <div class="menu_bg2">
                <asp:Button ID="btnAddDetail" runat="server" CssClass="input_button1" Text="新增明细"
                    OnClientClick="BatchSelectingVip('../');" OnClick="btnAddDetail_Click" /></div>
            <div class="juli">
                <asp:DataList ID="dlistDetail" runat="server" OnItemCommand="dlistDetail_ItemCommand"
                    OnItemDataBound="dlistDetail_ItemDataBound" CellPadding="0">
                    <ItemTemplate>
                        <tr>
                            <td width="60" align="center" class="bk_middle">
                                <asp:Button ID="btnDelete" runat="server" CssClass="input_button" Text="删除" CommandName="del" />
                            </td>
                            <td width="140" align="center" class="bk_middle">
                                <asp:Label ID="lblDetailId" runat="server" Text='<%# Eval("BAD_DETAILCODE")%>'></asp:Label>
                            </td>
                            <td width="140" align="center" class="bk_middle">
                                <asp:Label ID="lblCustomerCode" runat="server" Text='<%# Eval("BAD_CUSTOMERCODE")%>'></asp:Label>
                            </td>
                            <td width="140" align="center" class="bk_middle">
                                <asp:Label ID="lblNick" runat="server" Text='<%# Eval("BYZD5")%>'></asp:Label>
                            </td>
                            <td width="140" align="center" class="bk_middle">
                                <asp:Label ID="lblCustomerName" runat="server" Text='<%# Eval("GKMC")%>'></asp:Label>
                            </td>
                            <td width="240" align="center" class="bk_middle">
                                <asp:TextBox ID="txtAmount" runat="server" CssClass="zt7" Text='<%# String.Format("{0:0.00}",Eval("BAD_AMT"))%>'></asp:TextBox>
                            </td>
                            <td align="center" class="bk_middle">
                                <asp:TextBox ID="txtNote" runat="server" Width="300" Text='<%# Eval("BAD_NOTE")%>'></asp:TextBox>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <HeaderTemplate>
                        <table border="0" cellspacing="0" cellpadding="0">
                            <tr class="z1">
                                <td class="zt3" width="60">
                                    删除
                                </td>
                                <td class="zt3" width="140">
                                    明细编号
                                </td>
                                <td class="zt3" width="140">
                                    会员帐号
                                </td>
                                <td class="zt3" width="140">
                                    会员昵称
                                </td>
                                <td class="zt3" width="140">
                                    会员真实姓名
                                </td>
                                <td class="zt3" width="240">
                                    调整金额
                                </td>
                                <td class="zt3">
                                    备注
                                </td>
                            </tr>
                    </HeaderTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:DataList></div>
        </div>
    </form>
</body>
</html>
